// Copyright 2017 The Kubernetes Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@import '../../../variables';

kd-resource-card-column {
  border-top: 1px solid $border;
  display: flex;
  flex-basis: auto;
  min-height: $baseline-grid * 4;
  min-width: $baseline-grid * 10;
  padding-left: 2 * $baseline-grid;
  padding-top: $baseline-grid / 2;

  // Add this class to kd-resource-card-column to make it layout its children in a row.
  &.kd-row-layout-column {
    .kd-resource-card-column-container {
      align-items: center;
      display: flex;
      flex-direction: row;
      word-break: break-all;
    }
  }

  // Add this class kd-resource-card-column to make it a compact column with icons.
  &.kd-icon-column {
    margin-bottom: -$baseline-grid / 2;
    padding-top: 0;

    .md-button {
      margin: 0;
    }

    .kd-resource-card-column-container {
      justify-content: flex-end;
    }
  }

  &:not(:last-child) {
    overflow: hidden;
  }

  &:last-child {
    padding-right: $baseline-grid;
  }
}

.kd-resource-card-list-with-statuses {
  kd-resource-card-column {
    &:first-child {
      padding-left: $baseline-grid;
    }
  }
}

.kd-resource-card-column-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}
